#include <stdio.h>
#include <string.h>
#include "sha256.h"

void main()
{
	char buf[1024], digest[32], hex[65];
	struct SHA256Context sha256;
	while(~scanf("%s", buf)) {
		printf("SHA256(\"%s\")= ", buf);
		SHA256Init(&sha256);
		SHA256Update(&sha256, buf, strlen(buf));
		SHA256Final(digest, &sha256);
		SHA256HexString(hex, digest);
		printf("HEX %s\n", hex);
	}
}

